package cn.wolfcode.luowowo.hotel.service.impl;

import cn.wolfcode.luowowo.hotel.domain.Hotel;
import cn.wolfcode.luowowo.hotel.domain.HotelCity;
import cn.wolfcode.luowowo.hotel.mapper.HotelMapper;
import cn.wolfcode.luowowo.hotel.query.HotelQuery;
import cn.wolfcode.luowowo.hotel.service.IHotelService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class HotelServiceImpl implements IHotelService {
    @Autowired
    private HotelMapper hotelMapper;

    public List<HotelCity> getHotelByTheme(String content) {
        return hotelMapper.getHotelByTheme(content);
    }

    public List<Hotel> getHotelByCity(String name) {
        return hotelMapper.getHotelByCity(name);
    }

    public List<Hotel> query(HotelQuery qo) {
        return hotelMapper.selectForList(qo);
    }

    public List<Hotel> selectHotelByUserId(Long id) {
        return hotelMapper.selectHotelByUserId(id);
    }
}
